<!-- Imported scripts on this page -->
<script src="/public/js/timepicker/bootstrap-timepicker.min.js"></script>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">课程名称</label>

    <div class="col-sm-10">
        <input type="text" name="curriculum.curriculumName" class="form-control" placeholder="请输入课程名称"
               data-validate="required" value="${curriculum?.curriculumName}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">供应商选择</label>

    <div class="col-sm-10">
        <input id="idAdminSupplierId" type="hidden" name="curriculum.adminSupplier.id" value="${curriculum?.adminSupplier?.id}">
        <input id="idAdminSupplierName" readonly onclick="checkSupplier()" type="text" class="form-control" placeholder="点击选择供应商"
               data-validate="required" value="${curriculum?.adminSupplier?.name}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">课程类型</label>

    <div class="col-sm-10">
        <select class="form-control" name="curriculum.curriculumType.id" data-validate="required">
            <option value="">请选择课程类型</option>
        #{list curriculumTypes,as:'curriculumType'}
            <option ${curriculumType?.id==curriculum?.curriculumType?.id?'selected' : ''} value="${curriculumType?.id}">${curriculumType?.typeName}</option>
        #{/list}
        </select>
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">开始时间</label>

    <div class="col-sm-10">
        <input type="text" class="form-control datepicker" data-format="yyyy-mm-dd" name="curriculum.startTime" placeholder="开始时间"
               data-validate="required" value="${curriculum?.startTime}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">结束时间</label>

    <div class="col-sm-10">
        <input type="text" class="form-control datepicker" data-format="yyyy-mm-dd" name="curriculum.endTime" placeholder="结束时间"
               data-validate="required" value="${curriculum?.endTime}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">课程数量(节)</label>

    <div class="col-sm-10">
        <input type="text" name="curriculum.quantity" class="form-control" placeholder="0"
               data-validate="required" value="${curriculum?.quantity}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">课程价格(元)</label>

    <div class="col-sm-10">
        <input type="text" name="curriculum.price" class="form-control" placeholder="0"
               data-validate="required" value="${curriculum?.price}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">负责人</label>

    <div class="col-sm-10">
        <input type="text" name="curriculum.chargeMan" class="form-control" placeholder="课程负责人"
               data-validate="required" value="${curriculum?.chargeMan}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-2">备注</label>

    <div class="col-sm-10">
        <textarea class="form-control" cols="5" id="field-5" name="curriculum.remark" placeholder="请输入备注">${curriculum?.remark}</textarea>
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-5"></label>

    <div class="col-sm-10">
        <button type="submit" class="btn btn-success">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>
        <button type="reset" class="btn btn-white">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
    </div>

</div>


<script type="text/javascript">
    function checkSupplier() {
        layer.open({
            title:"供应商选择",
            type: 2,
            area: ['400px', '500px'],
            fixed: true,
            maxmin: false,
            content: '/warehouse/AdminSupplierCtrl/popAdminSuppliers'
        });
    }


    function callBack(id , name) {
        $('#idAdminSupplierId').val(id);
        $('#idAdminSupplierName').val(name);
        layer.closeAll();
    }

</script>